1. Field of the Invention
The present invention relates to an image pickup apparatus performing focus detection by using an image signal obtained by an image sensor, which photoelectrically converts an object image formed by an imaging optical system, and a control method for the image pickup apparatus.
2. Description of the Related Art
Many digital cameras and video cameras employ an autofocusing method called the contrast detection autofocus (AF) method. This method uses a signal output from an image sensor such as a charge-coupled device (CCD) or a complementary metal oxide semiconductor (CMOS) and detects a signal corresponding to a contrast evaluation value of the object. According to this method, contrast evaluation values of the object are sequentially detected (i.e., AF scanning operation) while the focus lens moves in a predetermined range in the optical axis direction. The focus lens position having the largest contrast evaluation value is determined as the in-focus position.
Further, there is known an image pickup apparatus which, by using a signal output from an image sensor, executes face detection processing by detecting a face of a person in an imaging range and performs focus control so that the face is in focus.
Japanese Patent Application Laid-Open No. 2009-98317 discusses a method that performs face detection and determines an AF target area (focus detection area) from a face detection area detected by the contrast detection AF method. According to this method, since the size of the AF target area is changed according to the size of the detected face, the effect of the background is reduced and high-precision focus detection can be realized.
Further, Japanese Patent Application Laid-Open No. 2011-39460 discusses a method that performs face detection, sets a main AF target area in the face area, and further sets an auxiliary AF area in the periphery of the main AF target area. Since the main AF target area is set in the face area, it is less likely to be affected by the background.
However, according to the conventional technique discussed in the above-described Japanese Patent Application Laid-Open No. 2009-98317, since the AF target area includes the face outline, the face outline goes in and out of the AF target area when the scanning operation is performed. This affects the contrast evaluation value and reduces the focus detection accuracy. Especially, in a backlight condition where the background is brighter than the face, the focus detection is significantly affected.
On the other hand, according to the conventional technique discussed in Japanese Patent Application Laid-Open No. 2011-39460, since the AF target area is set in the detected face detection area, the in-and-out of the face outline with respect to the AF target area during the AF scanning operation is reduced. However, if the face makes a comparatively large movement, the AF target area is affected by the movement. The effect of the movement of the face during the AF scanning operation can be reduced by reducing the size of the AF target area. However, if the AF target area becomes smaller, the information amount of contrast evaluation values obtained from the AF target area is reduced, and the focus accuracy may be reduced in low luminance or low contrast environment.
Further, the direction of the face outline, which is more likely to affect the contrast evaluation value, is not referred to in the above-described Japanese Patent Application Laid-Open No. 2009-98317 and Japanese Patent Application Laid-Open No. 2011-39460.